<template>
  <div class="sidebar-container">
    <el-row class="tac" style="height: 100%;">
      <el-col :span="24" style="height: 100%;">
        <el-menu
          class="el-menu-vertical-demo"
          :default-active="activeIndex"
          @select="handleSelect"
          @open="handleOpen"
          @close="handleClose"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-submenu index="">
            <template slot="title">
              <i class="el-icon-user"></i>
              <span>个人信息</span>
            </template>
          </el-submenu>
          <el-menu-item index="4">
            <i class="el-icon-video-camera"></i>
            <span slot="title">面部匹配</span>
          </el-menu-item>
          <el-menu-item index="5">
            <i class="el-icon-video-camera"></i>
            <span slot="title">相似度检测</span>
          </el-menu-item>
          <el-menu-item index="6">
            <i class="el-icon-video-camera"></i>
            <span slot="title">表情检测</span>
          </el-menu-item>
          <el-menu-item index="7">
            <i class="el-icon-video-camera"></i>
            <span slot="title">疲劳检测</span>
          </el-menu-item>
          <el-menu-item index="8">
            <i class="el-icon-picture-outline"></i>
            <span slot="title">面部匹配（图片）</span>
          </el-menu-item>
          <el-menu-item index="9">
            <i class="el-icon-picture"></i>
            <span slot="title">表情检测（图片）</span>
          </el-menu-item>
          <el-menu-item index="10">
            <i class="el-icon-picture"></i>
            <span slot="title">相似度检测（图片）</span>
          </el-menu-item>
        </el-menu>
        <statistic></statistic>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import Statistic from './statistic.vue';

export default {
  components: {
    Statistic,
  },
  data() {
    return {
      activeIndex: '4', // 默认选中的项
    };
  },
  methods: {
    handleSelect(index, indexPath) {
      this.activeIndex = index;
    },
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style>
.sidebar-container {
  height: 100%;
}
</style>

